<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #content{
            height: 500px;
            background-color: aqua;
        }
        #content2{
            height: 800px;
            background-color: blanchedalmond;
        }
        #mav{
            height: 200px;
            width: 100px;
            background-color: red;
            position: fixed;
            /* 固定定位 */
            right: 100px;
            top: 100px;
        }
    </style>
</head>
<body>
    <div id="content">
        <div id="mav">导航栏</div>
    </div>
    <div id="content2">
        内容
    </div>
</body>
</html>